/*
day53_4
2019.10.20
*/

#define MIN(a,b) ( (a)>(b) ? (b) : (a) )

struct TreeNode{
	int val;
	struct TreeNode *left;
	struct TreeNode *right;
};


int minDepth(struct TreeNode* root)
{
	if(!root) return 0;
	if(!root->left&&!root->right) return 1;
	if(!root->left) return minDepth(root->right)+1;
	if(!root->right) return minDepth(root->left)+1;

	return MIN(minDepth(root->left),minDepth(root->right))+1;
}


int main()
{
	return 0;
}
